home *** CD-ROM | disk | FTP | other *** search
- /*
- File: FragmentTool.h
-
- Contains: Common header file included by all source files
-
- Written by: Chris White, Developer Technical Support
-
- Copyright: © 1995 by Apple Computer, Inc., all rights reserved.
-
- Change History (most recent first):
-
- 9/28/95 CW First release
-
- */
-
-
-
- #ifndef __FRAGMENTTOOL__
- #define __FRAGMENTTOOL__
-
-
-
- #ifndef __WINDOWS__
- #include <Windows.h>
- #endif
-
- #ifndef __FILES__
- #include <Files.h>
- #endif
-
- #include <Drag.h>
- #include <Lists.h>
- #include <Types.h>
- #include <Dialogs.h>
-
-
-
-
- #define DEBUGGING 1
-
-
- #define kFourQuestionMarks 0x3F3F3F3F
-
-
- enum
- {
- /* File types & creators */
-
- kCreatorCode = 'frgt'
- };
-
-
-
- enum
- {
- /* Internal error codes */
-
- kGenericError = 1,
- kNeedSystem7,
- kCFMNotPresent,
- kMixedModeNotPresent,
- kDragManagerNotPresent
- };
-
-
-
- enum
- {
- // Error strings
-
-
- kGenericErrorStr = 4,
- kUnresolvedDependenciesStr = 5,
- kFileOpenStr = 6
- };
-
-
-
- enum
- {
- kDAWindowType = 100,
- kDocumentWindowType,
- kListWindowType,
- kGetInfoWindowType,
- kMoveFragmentWindowSubType,
- kCopyFragmentWindowSubType
- };
-
-
-
- enum
- {
- kNotCancelled = false,
- kCancelled = true
- };
-
- #define kDisplayWindow 1000
-
-
-
-
- #define kAboutDialog 1001
- #define kErrorDialog 1002
- #define kSaveDontsaveDialog 2003
- #define rErrorStrings 1002
-
- typedef Byte int8;
- typedef short int16;
- typedef long int32;
-
-
-
-
- typedef struct WindowInfo
- {
- Boolean bUntitled;
- Boolean bDirty;
- ListRef listRef;
- Handle dataHandle;
- FSSpec fileSpec;
-
- } tWindowInfo, *tWindowInfoPtr;
-
-
- typedef struct DialogInfo
- {
- int16 windowType;
- int16 windowSubType;
- ListHandle listRef;
- int32 refCon;
-
- } tDialogInfo, *tDialogInfoPtr;
-
-
-
-
- typedef struct DrawingWindow DrawingWindow, *DrawingWindowPeek;
-
-
-
- typedef OSErr (*tContentsProcPtr) ( ListRef theList, void* refCon );
-
-
-
-
- struct AddFragmentsRecOut
- {
- int16 theFileRef;
- };
-
-
- struct AddFragmentsRecIn
- {
- Handle theDataHandle;
- };
-
-
- typedef struct AddFragmentsRec
- {
- union
- {
- struct AddFragmentsRecOut out;
- struct AddFragmentsRecIn in;
- } u;
-
- } tAddFragmentsRec;
-
-
-
- typedef struct DragData
- {
- WindowRef theWindow;
- int16 theIndex;
- } tDragData;
-
-
-
-
- /* Global Variable Definitions */
-
-
-
- /*
- This allows me to include this file in all sources with the
- extern keyword used in all instances except the main source file.
- */
-
- #ifdef __MAIN__
- #define global
- #else
- #define global extern
- #endif
-
-
- global Boolean gQuit; /* quit program flag */
- global int32 gSleepTime;
- global int16 gMenuState; /* In what state did we last leave our menu bar? */
- global WindowRef gCurrentWindow; /* Which window are we redrawing? */
- global Handle gCommonMenuBar; /* The menubar for the app itself, with no tool menus */
-
- global Boolean gHasDragManager; /* Is the Drag Manager available? */
- global UserItemUPP gOutlineUserItemUPP;
- global DragTrackingHandlerUPP gDragTrackingHandlerUPP;
- global DragReceiveHandlerUPP gDragReceiveHandlerUPP;
- global DragSendDataUPP gDragSendDataProcUPP;
- global ListClickLoopUPP gClickLoopUPP;
-
-
- #endif // __FRAGMENTTOOL__
-